home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / gui / textfield.lha / Textfield / HSPascal / Textfield.pas < prev   
Pascal/Delphi Source File  |  1995-06-23  |  4KB  |  148 lines

  1. {    TextField (V3.1) interface for HSPascal     }
  2. {                                                }
  3. { Textfield is (C) Copyright 1995 by Mark Thomas }
  4. {                                                }
  5. {  HSPascal interface v2.0 by Mark Thomas        }
  6. {      with help from Foivos Kourendas           }
  7.  
  8. { Please note that some parts of V3 defines      }
  9. { are commented out since I don't know the       }
  10. { HSPascal type for C's char*.                   }
  11.  
  12. Unit TextField;
  13.  
  14. Interface
  15. Uses Exec,Intuition;
  16.  
  17. Const
  18.  
  19.     TEXTFIELDNAME = 'gadgets/textfield.gadget';
  20.     TEXTFIELDVERSION = 3;
  21.  
  22.     {  TAGS  | NOTE : TAG_User:=$80000000}
  23.  
  24.     TextField_TagBase = $84000000;
  25.  
  26.     { V1 atrributes }
  27.     TextField_Text          = $84000001;
  28.     TextField_InsertText    = $84000002;
  29.     TextField_TextFont      = $84000003;
  30.     TextField_Delimiters    = $84000004;
  31.     TextField_Top           = $84000005;
  32.     TextField_BlockCursor   = $84000006;
  33.     TextField_Size          = $84000007;
  34.     TextField_Visible       = $84000008;
  35.     TextField_Lines         = $84000009;
  36.     TextField_NoGhost       = $8400000A;
  37.     TextField_MaxSize       = $8400000B;
  38.     TextField_Border        = $8400000C;
  39.     TextField_TextAttr      = $8400000D;
  40.     TextField_FontStyle     = $8400000E;
  41.     TextField_Up            = $8400000F;
  42.     TextField_Down          = $84000010;
  43.     TextField_Alignment     = $84000011;
  44.     TextField_VCenter       = $84000012;
  45.     TextField_RuledPaper    = $84000013;
  46.     TextField_PaperPen      = $84000014;
  47.     TextField_InkPen        = $84000015;
  48.     TextField_LinePen       = $84000016;
  49.     TextField_UserAlign     = $84000017;
  50.     TextField_Spacing       = $84000018;
  51.     TextField_ClipStream    = $84000019;
  52.     TextField_ClipStream2   = $8400001A;
  53.     TextField_UndoStream    = $8400001A;
  54.     TextField_BlinkRate     = $8400001B;
  55.     TextField_Inverted      = $8400001C;
  56.     TextField_Partial       = $8400001D;
  57.     TextField_CursorPos     = $8400001E;
  58.  
  59.     { V2 atrributes }
  60.  
  61.     TextField_ReadOnly      = $8400001F;
  62.     TextField_Modified      = $84000020;
  63.     TextField_AcceptChars   = $84000021;
  64.     TextField_RejectChars   = $84000022;
  65.     TextField_PassCommand   = $84000023;
  66.     TextField_LineLength    = $84000024;
  67.     TextField_MaxSizeBeep   = $84000025;
  68.     TextField_DeleteText    = $84000026;
  69.     TextField_SelectSize    = $84000027;
  70.     TextField_Copy          = $84000028;
  71.     TextField_CopyAll       = $84000029;
  72.     TextField_Cut           = $8400002A;
  73.     TextField_Paste         = $8400002B;
  74.     TextField_Erase         = $8400002C;
  75.     TextField_Undo          = $8400002D;
  76.  
  77.     { V3 atrributes }
  78.  
  79.     TextField_TabSpaces     = $8400002E;
  80.     TextField_NonPrintChars = $8400002F;
  81.  
  82.     {  TextField_Border  }
  83.  
  84.     TextField_BORDER_NONE        = 0;
  85.     TextField_BORDER_BEVEL       = 1;
  86.     TextField_BORDER_DOUBLEBEVEL = 2;
  87.  
  88.  
  89.     {  TextField_Alignment  }
  90.  
  91.     TextField_ALIGN_LEFT   = 0;
  92.     TextField_ALIGN_CENTER = 1;
  93.     TextField_ALIGN_RIGHT  = 2;
  94.  
  95. Function GetClass: pIClass;
  96. Function TextField_GetClass: pIClass;
  97.  
  98. { I don't have HSPascal, so I can't be    }
  99. { sure about this:                        }
  100.  
  101. { Function TextField_GetCopyright: pChar; }
  102.  
  103. Var
  104.     TextFieldBase: pLibrary;
  105.     TextFieldClass: pIClass;
  106.  
  107. Implementation
  108.  
  109. Function GetClass: pIClass;
  110. XASSEMBLER;
  111. ASM    move.l    a6,-(sp)
  112.     move.l    TextFieldBase,a6
  113.     jsr    -$1E(a6)
  114.     move.l    d0,$8(sp)
  115.     move.l    (sp)+,a6
  116. END;
  117.  
  118. { I don't have HSPascal, so I can't be    }
  119. { sure about this:                        }
  120.  
  121. {
  122. Function GetCopyright: pChar;
  123. XASSEMBLER;
  124. ASM    move.l    a6,-(sp)
  125.     move.l    TextFieldBase,a6
  126.     jsr    -$24(a6)
  127.     move.l    d0,$8(sp)
  128.     move.l    (sp)+,a6
  129. END;
  130. }
  131.  
  132. Function TextField_GetClass: pIClass;
  133. BEGIN
  134.     TextField_GetClass := GetClass;
  135. END;
  136.  
  137. { I don't have HSPascal, so I can't be    }
  138. { sure about this:                        }
  139.  
  140. {
  141. Function TextField_GetCopyright: pChar;
  142. BEGIN
  143.     TextField_GetCopyright := GetCopyright;
  144. END;
  145. }
  146.  
  147. End.
  148.